package com.qymerge.manage.core.enums;

/**
 * Desc
 * User cong.li
 * Date 2017/4/4
 * Time 22:34
 */
public enum ParentTypes {

    User(1000, "用户", "user"),
    Inquiry(2000, "问诊", "inquiry"),
    Product(3000, "商品", "product"),
    Article(4000, "文章", "article"),
    Banner(5000, "推荐位", "banner"),
    Hospital(6000, "医院", "hospital"),
    Spread(7000, "传播", "spread"),
    Comment(8000, "评价", "comment"),
    Patient(9000, "患者", "patient"),
    WxActivity(10000, "微信活动", "wx_activity"),
    ;

    private int id;         //类型ID
    private String name;    //类型名称
    private String picDir;  //图片文件目录

    ParentTypes(int id, String name, String picDir) {
        this.id = id;
        this.name = name;
        this.picDir = picDir;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPicDir() {
        return picDir;
    }

    public void setPicDir(String picDir) {
        this.picDir = picDir;
    }

    public static ParentTypes get(int id) {
        for (ParentTypes type : ParentTypes.values()) {
            if (type.getId() == id) {
                return type;
            }
        }
        return null;
    }

}
